package oop.java0329.work1;

/**
 * 战斗机添加额外的方法,比如发射导弹.
 * 低空盘旋等方法
 */
public class WarPlane extends Plane {
    private int warCount;

    public WarPlane(int warCount) {
        this.warCount = warCount;
    }

    public WarPlane(double weight, double height, int warCount) {
        super(weight, height);
        this.warCount = warCount;
    }

    public int getWarCount() {
        return warCount;
    }

    public void setWarCount(int warCount) {
        this.warCount = warCount;
    }

    public void fire() {
        System.out.println("发射" + warCount + "枚导弹");
    }

    public void hover() {
        System.out.println("盘旋侦察");
    }

    @Override
    public void showInfo() {
        super.showInfo();
        System.out.println("携弹量：" + warCount);
    }
}
